define(['app'], function (app) {
    app.controller('GouwucheCtrl', ['$scope', 'DataService', 'UtilFactory', function ($scope, DataService, UtilFactory) {
    	$scope.tabbardj($scope.navBtns, 2);

        $scope.goods = DataService.getAllGoods();
    	$scope.reduce = function () {
            DataService.reduce(this.$index);
            console.log(DataService.getAllGoods());

            $scope.allPrice = UtilFactory.money();
        };

        $scope.add = function () {
            var a = $scope.goods[this.$index];
            console.log(a);

            a.count++;

            $scope.allPrice = UtilFactory.money();
        };

        $scope.allPrice = UtilFactory.money();

    }])
})